import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Esta Clase se utiliza para poner un objeto en el escenario
 */
public class MuroAcero  extends Actor
{
    /**
     * Act - do whatever the Ironwall wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     */
    public void act() 
    {
        checaBala();
        checaBala2();
    }
    
    public void checaBala()
    {
        Actor bala=getOneIntersectingObject(Bala.class);
        if(bala != null)
        {
            World mundo=getWorld();
            Greenfoot.playSound("pop.wav");
            mundo.removeObject(bala);
        }
    } 
    
    public void checaBala2()
    {
        Actor bala2=getOneIntersectingObject(Bala2.class);
        if(bala2 != null)
        {
            World mundo=getWorld();
            Greenfoot.playSound("pop.wav");
            mundo.removeObject(bala2);
        }
    }
}
